import request from '@/utils/request'

// 查询盲盒分类列表
export function listCwcategory(query) {
  return request({
    url: '/system/cwcategory/list',
    method: 'get',
    params: query
  })
}

// 查询盲盒分类详细
export function getCwcategory(categoryId) {
  return request({
    url: '/system/cwcategory/' + categoryId,
    method: 'get'
  })
}

// 新增盲盒分类
export function addCwcategory(data) {
  return request({
    url: '/system/cwcategory',
    method: 'post',
    data: data
  })
}

// 修改盲盒分类
export function updateCwcategory(data) {
  return request({
    url: '/system/cwcategory',
    method: 'put',
    data: data
  })
}

// 删除盲盒分类
export function delCwcategory(categoryId) {
  return request({
    url: '/system/cwcategory/' + categoryId,
    method: 'delete'
  })
}
